package kids;

import emergent.Rule;

public class StartIncreasing implements Rule<GameWorld, Kid> {

	@Override
	public void doAction(GameWorld world, Kid agent) {
		agent.setIncreasing(true);
	}

	@Override
	public boolean verifyGuard(GameWorld world, Kid agent) {
		Kid rightHandSideAgent = agent.getRightHandSideAgent();
		if (rightHandSideAgent == null) return false;
		return (rightHandSideAgent.getValue() == 0 && !rightHandSideAgent.isIncreasing());
	}

}
